package com.ljx.itbbs.server.user.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ljx.itbbs.server.user.domain.entity.RoleEntity;
import com.ljx.itbbs.server.user.domain.entity.UserRoleRelationEntity;
import com.ljx.itbbs.server.user.mapper.UserRoleRelationMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户角色关联表 服务实现类
 * </p>
 *
 * @author LiJunXi
 * @since 2024-03-02
 */
@Service
public class UserRoleRelationDao extends ServiceImpl<UserRoleRelationMapper, UserRoleRelationEntity> {

    public void deleteByUid(Long uid) {
        this.baseMapper.delete(new LambdaQueryWrapper<UserRoleRelationEntity>()
                .eq(UserRoleRelationEntity::getUserId, uid));
    }
}
